﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KPIS.GERP.GHRMS.MODEL
{
    public class PositionInfo : RecordInfo
    {
        private Nullable<int> seq;
        private string ref_no;
        private string pos_name;
        private string pos_text;
        private string job_description;
        private Nullable<DateTime> date_defined;
        private Nullable<DateTime> date_money_support;
        private Nullable<double> salary_quota;
        private Nullable<double> salary_max;
        private Nullable<double> salary_min; 
        private FieldInfo field_pos_seq;
        private ExecutiveInfo exec_pos_seq;
        private EmployeeTypeInfo emp_type_seq;
		private JobSiteInfo job_site_seq;
		private PositionTypeInfo pos_type_seq;
        private PositionInfo upper_pos_seq;
        private PositionInfo working_upper_pos_seq;
        private ClassSpecificationInfo class_spec_seq;
        private EmployeeInfo emp_seq;
        private PositionStatusInfo pos_status_seq;
		private Nullable<int> parent;
		public int? PosTypeSeq { get; set; }
		public int? ClassSeq { get; set; }

        public PositionInfo()
        {
        }
        public PositionInfo(Nullable<int> Sequence)
        {
            this.Sequence = Sequence;
        }
        public PositionInfo(Nullable<int> Sequence, string RefNo, string Name, string JobDescription
            , Nullable<DateTime> DefinedDate, Nullable<DateTime> MoneySupportDate, Nullable<double> SalaryQuota
            , Nullable<double> SalaryMax, Nullable<double> SalaryMin, FieldInfo Field, ExecutiveInfo Executive
            , EmployeeTypeInfo EmployeeType, JobSiteInfo JobSite, PositionTypeInfo PositionType, PositionInfo Upper
            , PositionInfo WorkingUpper, ClassSpecificationInfo ClassSpecification, EmployeeInfo Employee
            , PositionStatusInfo Status, string Remarks, string RecordStatus, Nullable<int> CreatedBy, Nullable<int> UpdatedBy) //, FieldInfo Field
        {
            this.Sequence = Sequence;
            this.RefNo = RefNo;
            this.Name = Name;
            this.JobDescription = JobDescription;
            this.DefinedDate = DefinedDate;
            this.MoneySubportDate = MoneySubportDate;
            this.SalaryQuota = SalaryQuota;
            this.SalaryMax = SalaryMax;
            this.SalaryMin = SalaryMin;
            this.Field = Field;
            this.Executive = Executive;
            this.EmployeeType = EmployeeType;
            this.JobSite = JobSite;
            this.PositionType = PositionType;
            this.Upper = Upper;
            this.WorkingUpper = WorkingUpper;
            this.ClassSpecification = ClassSpecification;
            this.Employee = Employee;
            this.Remarks = Remarks;
            this.Status = Status;
            this.RecordStatus = RecordStatus;
            this.CreatedBy = CreatedBy;
            this.UpdatedBy = UpdatedBy;
        }
        public Nullable<int> Sequence
        {
            get
            {
                return seq;
            }
            set
            {
                seq = value;
            }
        }

        public string RefNo
        {
            get
            {
                return ref_no;
            }
            set
            {
                ref_no = value;
            }
        }
        public string Name
        {
            get
            {
                return pos_name;
            }
            set
            {
                pos_name = value;
            }
        }
        public string PosText
        {
            get
            {
                return pos_text;
            }
            set
            {
                pos_text = value;
            }
        }
        public FieldInfo Field
        {
            get
            {
                return field_pos_seq;
            }
            set
            {
                field_pos_seq = value;
            }
        }

        public ExecutiveInfo Executive
        {
            get
            {
                return exec_pos_seq;
            }
            set
            {
                exec_pos_seq = value;
            }
        }
        public EmployeeTypeInfo EmployeeType
        {
            get
            {
                return emp_type_seq;
            }
            set
            {
                emp_type_seq = value;
            }
        }

        public JobSiteInfo JobSite
        {
            get
            {
                return job_site_seq;
            }
            set
            {
                job_site_seq = value;
            }
        }

        public PositionTypeInfo PositionType
        {
            get
            {
                return pos_type_seq;
            }
            set
            {
                pos_type_seq = value;
            }
        }

        public PositionInfo Upper
        {
            get
            {
                return upper_pos_seq;
            }
            set
            {
                upper_pos_seq = value;
            }
        }
        public PositionInfo WorkingUpper
        {
            get
            {
                return working_upper_pos_seq;
            }
            set
            {
                working_upper_pos_seq = value;
            }
        }
        public ClassSpecificationInfo ClassSpecification
        {
            get
            {
                return class_spec_seq;
            }
            set
            {
                class_spec_seq = value;
            }
        }
        public PositionStatusInfo Status
        {
            get
            {
                return pos_status_seq;
            }
            set
            {
                pos_status_seq = value;
            }
        }
        public string JobDescription
        {
            get
            {
                return job_description;
            }
            set
            {
                job_description = value;
            }
        }
        public Nullable<DateTime> DefinedDate
        {
            get
            {
                return date_defined;
            }
            set
            {
                date_defined = value;
            }
        }
        public Nullable<DateTime> MoneySubportDate
        {
            get
            {
                return date_money_support;
            }
            set
            {
                date_money_support = value;
            }
        }

        public Nullable<double> SalaryQuota
        {
            get
            {
                return salary_quota;
            }
            set
            {
                salary_quota = value;
            }
        }

        public Nullable<double> SalaryMax
        {
            get
            {
                return salary_max;
            }
            set
            {
                salary_max = value;
            }
        }

        public Nullable<double> SalaryMin
        {
            get
            {
                return salary_min;
            }
            set
            {
                salary_min = value;
            }
        }

        public EmployeeInfo Employee
        {
            get
            {
                return emp_seq;
            }
            set
            {
                emp_seq = value;
            }
        }
        public Nullable<int> Parent
        {
            get
            {
                return parent;
            }
            set
            {
                parent = value;
            }
        }

        public override string ToString()
        {
            return ref_no + " - " + pos_name + (Employee != null ? Employee.Full : "");
        }
    }
}
